// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * WidgetInstancePageLayout generated by hbm2java
 */
@Entity
@Table(name = "widget_instance_page_layout", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = {
		"layout_update_id", "page_id" }))
public class WidgetInstancePageLayout implements java.io.Serializable {
	private static final long serialVersionUID = 121323L;

	private WidgetInstancePageLayoutId id;
	private CoreLayoutUpdate coreLayoutUpdate;
	private WidgetInstancePage widgetInstancePage;

	public WidgetInstancePageLayout() {
	}

	public WidgetInstancePageLayout(WidgetInstancePageLayoutId id,
			CoreLayoutUpdate coreLayoutUpdate,
			WidgetInstancePage widgetInstancePage) {
		this.id = id;
		this.coreLayoutUpdate = coreLayoutUpdate;
		this.widgetInstancePage = widgetInstancePage;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "pageId", column = @Column(name = "page_id", nullable = false)),
			@AttributeOverride(name = "layoutUpdateId", column = @Column(name = "layout_update_id", nullable = false)) })
	public WidgetInstancePageLayoutId getId() {
		return this.id;
	}

	public void setId(WidgetInstancePageLayoutId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "layout_update_id", nullable = false, insertable = false, updatable = false)
	public CoreLayoutUpdate getCoreLayoutUpdate() {
		return this.coreLayoutUpdate;
	}

	public void setCoreLayoutUpdate(CoreLayoutUpdate coreLayoutUpdate) {
		this.coreLayoutUpdate = coreLayoutUpdate;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "page_id", nullable = false, insertable = false, updatable = false)
	public WidgetInstancePage getWidgetInstancePage() {
		return this.widgetInstancePage;
	}

	public void setWidgetInstancePage(WidgetInstancePage widgetInstancePage) {
		this.widgetInstancePage = widgetInstancePage;
	}

}
